package me.idashu.attg.persistence;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.GoodsEntity;
import me.idashu.attg.domain.PageEntity;

public interface GoodsMapper {
	
	public List<GoodsEntity> getGoodsEntity();
	/**
	 * @param goodsEntity
	 * @return
	 */
	public void insertGoodsEntity(GoodsEntity goodsEntity);
	/**
	 * @param goodsId
	 */
	public void deleteGoodsEntity(int goodsId);
	/**
	 * 根据商铺ID获取商铺详情
	 * @param goodsId
	 * @return
	 */
	public GoodsEntity getGoodsEntityById(int goodsId);
	/**
	 * 给定条件分页查询商铺列表
	 * @param map
	 * @return
	 */
	public List<GoodsEntity> getGoodEntityByPage(Map<String, Object> map);
	/**
	 * 查询给定条件的商铺数量
	 * @param goodsEntity
	 * @return
	 */
	public int getCountGoodEntity(GoodsEntity goodsEntity);
	/**
	 * 根据条件后台查询商铺信息列表
	 * @param map
	 * @return
	 */
	public List<GoodsEntity> getListGoodsEntity(Map<String, Object> map);
	/**
	 * 根据条件后台查询商铺信息列表数量
	 * @param goodsEntity
	 * @return
	 */
	public int getCountListGoodsEntity(GoodsEntity goodsEntity);
	/**
	 * 查询商铺详情(后台)
	 * @param goodsId
	 * @return
	 */
	public GoodsEntity getGoodsInfoById(int goodsId);
	/**
	 * 修改商铺的状态
	 * @param goodsEntity
	 */
	public void updateGoodsStatus(GoodsEntity goodsEntity);
	/**
	 * 修改用到的查询商铺详情
	 * @param goodsId
	 * @return
	 */
	public GoodsEntity getGoodsEntityInfo(int goodsId);
	/**
	 * 修改商铺信息
	 * @param goodsEntity
	 */
	public void updateGoodsEntityInfo(GoodsEntity goodsEntity);
	/**
	 * 修改商铺是否团购
	 */
	public void updateGoodIsGroup(GoodsEntity goodsEntity);
	/**
	 * 获取热门商铺
	 * @param pageEntity
	 * @return
	 */
	
	public List<GoodsEntity> getHotGoodsEntity(PageEntity pageEntity);
	
	public int getCountHotGoodsEntity();
	
	public List<GoodsEntity> getSearchGoodsEntity(GoodsEntity goodsEntity);
	
	public void updateSendGoods(GoodsEntity goodsEntity);
	
	public GoodsEntity getGoodsEntityBySeq(int goodsSeq);
	
}
